import ArrayList from "@ohos.util.ArrayList";
import List from "@ohos.util.List";
import HashMap from "@ohos.util.HashMap";
import { instanceToInstance } from 'class-transformer';
export class ObjectUtils {
    static isString(property) {
        return typeof property === 'string' || property instanceof String;
    }
    static isNull(property) {
        return property === null || property === undefined;
    }
    static isEmpty(property) {
        if (ObjectUtils.isNull(property)) {
            return true;
        }
        else if (Array.isArray(property) || property instanceof Array) {
            return property.length == 0;
        }
        else if (property instanceof List) {
            return property.isEmpty();
        }
        else if (property instanceof ArrayList) {
            return property.isEmpty();
        }
        else if (property instanceof HashMap) {
            return property.isEmpty();
        }
        return property == '';
    }
    static equal(source, target) {
        return source === target;
    }
    static notEqual(source, target) {
        return false == ObjectUtils.equal(source, target);
    }
    static deepCopy(obj) {
        return instanceToInstance(obj);
    }
}
